package org.car.world.service.impl;

import java.util.List;

import org.car.world.core.entily.IssueTable;
import org.car.world.core.mapper.IssueTableMapper;
import org.car.world.service.IssueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.PageHelper;


@Service
@Transactional(rollbackFor = {RuntimeException.class, Exception.class})
public class IssueServiceImpl implements IssueService {


    @Autowired
    IssueTableMapper issueTableMapper;

    @Override
    public int deleteByPrimaryKey(Integer issueId) {
        return issueTableMapper.deleteByPrimaryKey(issueId);
    }

    @Override
    public int insert(IssueTable record) {
        return issueTableMapper.insert(record);
    }

    @Override
    public IssueTable selectByPrimaryKey(Integer issueId) {
        return issueTableMapper.selectByPrimaryKey(issueId);
    }

    @Override
    public List<IssueTable> selectAll() {
        return issueTableMapper.selectAll();
    }

    @Override
    public int updateByPrimaryKey(IssueTable record) {
        return issueTableMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<IssueTable> selectIssueType(Integer form, Integer size, Integer istype) {
        PageHelper.startPage(form, size);
        return issueTableMapper.selectIssueTypelimit(istype);
    }

    @Override
    public int count(Integer type) {
        return issueTableMapper.count(type);
    }

    @Override
    public List<IssueTable> selectIssueTypelimit(Integer istype) {
        return issueTableMapper.selectIssueTypelimit(istype);
    }

    @Override
    public int updateByPrimaryKeyPic(Integer issueId) {
        return issueTableMapper.updateByPrimaryKeyPic(issueId);
    }


}
